package org.jmat.domain.entities;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * This class represents an address of a person.<br />
 * This class is <b>embeddable</b> 
 * @author Mathieu Chatelain
 * 
 */

@Embeddable
public class Address implements Serializable {
	
	private static final long serialVersionUID = -5279229615285779484L;
	private int number;
	private String street;
	private String city;
	
	public Address() {
		super();
	}

	public Address(int number, String street, String city) {
		super();
		this.number = number;
		this.street = street;
		this.city = city;
	}



	/**
	 * 
	 * @return int - get number of the address
	 */
	@Column(nullable = true)
	public int getNumber() {
		return number;
	}

	/**
	 * 
	 * @param int - set number of the address
	 */
	public void setNumber(int number) {
		this.number = number;
	}

	/**
	 * 
	 * @return String - get street of the address
	 */
	@Column(length = 80, nullable = true)
	public String getStreet() {
		return street;
	}

	/**
	 * 
	 * @param String - set street of the address
	 */
	public void setStreet(String street) {
		this.street = street;
	}

	/**
	 * 
	 * @return String - get city of the address
	 */
	@Column(length = 50, nullable = true)
	public String getCity() {
		return city;
	}

	/**
	 * 
	 * @param String - set city of the address
	 */
	public void setCity(String city) {
		this.city = city;
	}

}
